package org.platform.lwc.feign.config;

import feign.RequestInterceptor;
import org.platform.lwc.feign.interceptor.MicroFeignRequestHeaderInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * sentinel 配置
 *
 */
@Configuration
public class MyFeignAutoConfiguration {



    /**
     * @Description:  feign 的拦截器
     */
    @Bean
    @ConditionalOnMissingBean
    public RequestInterceptor MicroFeignRequestHeaderInterceptor() {
        return new MicroFeignRequestHeaderInterceptor();
    }
}
